/* copyleft (C) GPL3 {{{2
 * Filename:	user.c
 *
 * Author:	arrow <arrow_zhang@sdc.sercomm.com>
 * Created at:  Fri Aug 24 19:52:59 2007
 * }}}*/
/*header files	{{{1*/
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
/*}}}*/

/*declaration		{{{1*/
#define sbup printf
/*}}}*/

/*functions		{{{1*/
int main(int argc, char *argv[])
{
	int fd;
	int i;

	sbup("user mode, argc = %d\n", argc);
	fd = open(OUTPUT, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR | S_IROTH);
	if (fd == -1) {
		goto open_fail;
	}
	for (i = 0; i < argc; i ++) {
		write(fd, argv[i], strlen(argv[i]));
	}
	close(fd);
open_fail:
	return 0;
}

/* vim:fdm=marker:ts=8:ft=c:norl:fdl=1:
 * }}}*/

